package log

import (
	"github.com/labstack/echo"
	log2 "github.com/labstack/gommon/log"
	"os"
)

// echo 使用的logger
func InitLogger(lg echo.Logger, logPath string) {
	file, err := os.OpenFile(logPath+"/echo.log", os.O_APPEND|os.O_CREATE, 666)
	if err != nil {
		panic("初始化日志失败\r\n"+err.Error())
	}
	lg.SetOutput(file)
	lg.SetLevel(log2.DEBUG)
}
